import { Suspense } from 'react';
import { Spin } from 'antd'

const lazyLoad = (Com) => {
  return (
    <Suspense fallback={
      <Spin
        size="large"
        style={{
          display: "flex",
          alignItems: "center",
          justifyContent: "center",
          height: "100%"
        }}
      />
    }>
      <Com />
    </Suspense>
  );
};

export default lazyLoad;